package com.ido4web.model;
// Generated 7 พ.ค. 2557, 12:05:20 by Hibernate Tools 3.4.0.CR1


import java.math.BigDecimal;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Ido4SaleOrder generated by hbm2java
 */
@Entity
@Table(name="ido4_sale_order"
    ,catalog="ido4db"
)
public class Ido4SaleOrder  implements java.io.Serializable {


     private long soNo;
     private String soDescr;
     private Date soDate;
     private Long soCustNo;
     private String soCustCode;
     private String soCustTitleCode;
     private String soCustFirstName;
     private String soCustLastName;
     private String soCustIdCardNo;
     private BigDecimal soDiscountPerc;
     private BigDecimal soDiscountVal;
     private BigDecimal soDiscountTotal;
     private short soStatusIncVat;
     private BigDecimal soVatPercVal;
     private BigDecimal soTotalPriceExcVat;
     private BigDecimal soTotalVat;
     private BigDecimal soTotalPrice;
     private Short soStatusNo;
     private String soAddr;
     private String soMemo01;
     private Set<Ido4SaleOrderCustAddr> ido4SaleOrderCustAddrs = new HashSet<Ido4SaleOrderCustAddr>(0);
     private Set<Ido4SaleOrderItem> ido4SaleOrderItems = new HashSet<Ido4SaleOrderItem>(0);

    public Ido4SaleOrder() {
    }

	
    public Ido4SaleOrder(long soNo, String soDescr, Date soDate, BigDecimal soDiscountPerc, BigDecimal soDiscountVal, BigDecimal soDiscountTotal, short soStatusIncVat, BigDecimal soVatPercVal, BigDecimal soTotalPriceExcVat, BigDecimal soTotalVat, BigDecimal soTotalPrice) {
        this.soNo = soNo;
        this.soDescr = soDescr;
        this.soDate = soDate;
        this.soDiscountPerc = soDiscountPerc;
        this.soDiscountVal = soDiscountVal;
        this.soDiscountTotal = soDiscountTotal;
        this.soStatusIncVat = soStatusIncVat;
        this.soVatPercVal = soVatPercVal;
        this.soTotalPriceExcVat = soTotalPriceExcVat;
        this.soTotalVat = soTotalVat;
        this.soTotalPrice = soTotalPrice;
    }
    public Ido4SaleOrder(long soNo, String soDescr, Date soDate, Long soCustNo, String soCustCode, String soCustTitleCode, String soCustFirstName, String soCustLastName, String soCustIdCardNo, BigDecimal soDiscountPerc, BigDecimal soDiscountVal, BigDecimal soDiscountTotal, short soStatusIncVat, BigDecimal soVatPercVal, BigDecimal soTotalPriceExcVat, BigDecimal soTotalVat, BigDecimal soTotalPrice, Short soStatusNo, String soAddr, String soMemo01, Set<Ido4SaleOrderCustAddr> ido4SaleOrderCustAddrs, Set<Ido4SaleOrderItem> ido4SaleOrderItems) {
       this.soNo = soNo;
       this.soDescr = soDescr;
       this.soDate = soDate;
       this.soCustNo = soCustNo;
       this.soCustCode = soCustCode;
       this.soCustTitleCode = soCustTitleCode;
       this.soCustFirstName = soCustFirstName;
       this.soCustLastName = soCustLastName;
       this.soCustIdCardNo = soCustIdCardNo;
       this.soDiscountPerc = soDiscountPerc;
       this.soDiscountVal = soDiscountVal;
       this.soDiscountTotal = soDiscountTotal;
       this.soStatusIncVat = soStatusIncVat;
       this.soVatPercVal = soVatPercVal;
       this.soTotalPriceExcVat = soTotalPriceExcVat;
       this.soTotalVat = soTotalVat;
       this.soTotalPrice = soTotalPrice;
       this.soStatusNo = soStatusNo;
       this.soAddr = soAddr;
       this.soMemo01 = soMemo01;
       this.ido4SaleOrderCustAddrs = ido4SaleOrderCustAddrs;
       this.ido4SaleOrderItems = ido4SaleOrderItems;
    }
   
     @Id 

    
    @Column(name="SO_NO", unique=true, nullable=false)
    public long getSoNo() {
        return this.soNo;
    }
    
    public void setSoNo(long soNo) {
        this.soNo = soNo;
    }

    
    @Column(name="SO_DESCR", nullable=false, length=100)
    public String getSoDescr() {
        return this.soDescr;
    }
    
    public void setSoDescr(String soDescr) {
        this.soDescr = soDescr;
    }

    @Temporal(TemporalType.DATE)
    @Column(name="SO_DATE", nullable=false, length=10)
    public Date getSoDate() {
        return this.soDate;
    }
    
    public void setSoDate(Date soDate) {
        this.soDate = soDate;
    }

    
    @Column(name="SO_CUST_NO")
    public Long getSoCustNo() {
        return this.soCustNo;
    }
    
    public void setSoCustNo(Long soCustNo) {
        this.soCustNo = soCustNo;
    }

    
    @Column(name="SO_CUST_CODE", length=50)
    public String getSoCustCode() {
        return this.soCustCode;
    }
    
    public void setSoCustCode(String soCustCode) {
        this.soCustCode = soCustCode;
    }

    
    @Column(name="SO_CUST_TITLE_CODE", length=10)
    public String getSoCustTitleCode() {
        return this.soCustTitleCode;
    }
    
    public void setSoCustTitleCode(String soCustTitleCode) {
        this.soCustTitleCode = soCustTitleCode;
    }

    
    @Column(name="SO_CUST_FIRST_NAME", length=50)
    public String getSoCustFirstName() {
        return this.soCustFirstName;
    }
    
    public void setSoCustFirstName(String soCustFirstName) {
        this.soCustFirstName = soCustFirstName;
    }

    
    @Column(name="SO_CUST_LAST_NAME", length=50)
    public String getSoCustLastName() {
        return this.soCustLastName;
    }
    
    public void setSoCustLastName(String soCustLastName) {
        this.soCustLastName = soCustLastName;
    }

    
    @Column(name="SO_CUST_ID_CARD_NO", length=20)
    public String getSoCustIdCardNo() {
        return this.soCustIdCardNo;
    }
    
    public void setSoCustIdCardNo(String soCustIdCardNo) {
        this.soCustIdCardNo = soCustIdCardNo;
    }

    
    @Column(name="SO_DISCOUNT_PERC", nullable=false, precision=10)
    public BigDecimal getSoDiscountPerc() {
        return this.soDiscountPerc;
    }
    
    public void setSoDiscountPerc(BigDecimal soDiscountPerc) {
        this.soDiscountPerc = soDiscountPerc;
    }

    
    @Column(name="SO_DISCOUNT_VAL", nullable=false, precision=15)
    public BigDecimal getSoDiscountVal() {
        return this.soDiscountVal;
    }
    
    public void setSoDiscountVal(BigDecimal soDiscountVal) {
        this.soDiscountVal = soDiscountVal;
    }

    
    @Column(name="SO_DISCOUNT_TOTAL", nullable=false, precision=15)
    public BigDecimal getSoDiscountTotal() {
        return this.soDiscountTotal;
    }
    
    public void setSoDiscountTotal(BigDecimal soDiscountTotal) {
        this.soDiscountTotal = soDiscountTotal;
    }

    
    @Column(name="SO_STATUS_INC_VAT", nullable=false)
    public short getSoStatusIncVat() {
        return this.soStatusIncVat;
    }
    
    public void setSoStatusIncVat(short soStatusIncVat) {
        this.soStatusIncVat = soStatusIncVat;
    }

    
    @Column(name="SO_VAT_PERC_VAL", nullable=false, precision=10)
    public BigDecimal getSoVatPercVal() {
        return this.soVatPercVal;
    }
    
    public void setSoVatPercVal(BigDecimal soVatPercVal) {
        this.soVatPercVal = soVatPercVal;
    }

    
    @Column(name="SO_TOTAL_PRICE_EXC_VAT", nullable=false, precision=15)
    public BigDecimal getSoTotalPriceExcVat() {
        return this.soTotalPriceExcVat;
    }
    
    public void setSoTotalPriceExcVat(BigDecimal soTotalPriceExcVat) {
        this.soTotalPriceExcVat = soTotalPriceExcVat;
    }

    
    @Column(name="SO_TOTAL_VAT", nullable=false, precision=15)
    public BigDecimal getSoTotalVat() {
        return this.soTotalVat;
    }
    
    public void setSoTotalVat(BigDecimal soTotalVat) {
        this.soTotalVat = soTotalVat;
    }

    
    @Column(name="SO_TOTAL_PRICE", nullable=false, precision=15)
    public BigDecimal getSoTotalPrice() {
        return this.soTotalPrice;
    }
    
    public void setSoTotalPrice(BigDecimal soTotalPrice) {
        this.soTotalPrice = soTotalPrice;
    }

    
    @Column(name="SO_STATUS_NO")
    public Short getSoStatusNo() {
        return this.soStatusNo;
    }
    
    public void setSoStatusNo(Short soStatusNo) {
        this.soStatusNo = soStatusNo;
    }

    
    @Column(name="SO_ADDR", length=500)
    public String getSoAddr() {
        return this.soAddr;
    }
    
    public void setSoAddr(String soAddr) {
        this.soAddr = soAddr;
    }

    
    @Column(name="SO_MEMO_01", length=1000)
    public String getSoMemo01() {
        return this.soMemo01;
    }
    
    public void setSoMemo01(String soMemo01) {
        this.soMemo01 = soMemo01;
    }

@OneToMany(fetch=FetchType.LAZY, mappedBy="ido4SaleOrder")
    public Set<Ido4SaleOrderCustAddr> getIdo4SaleOrderCustAddrs() {
        return this.ido4SaleOrderCustAddrs;
    }
    
    public void setIdo4SaleOrderCustAddrs(Set<Ido4SaleOrderCustAddr> ido4SaleOrderCustAddrs) {
        this.ido4SaleOrderCustAddrs = ido4SaleOrderCustAddrs;
    }

@OneToMany(fetch=FetchType.LAZY, mappedBy="ido4SaleOrder")
    public Set<Ido4SaleOrderItem> getIdo4SaleOrderItems() {
        return this.ido4SaleOrderItems;
    }
    
    public void setIdo4SaleOrderItems(Set<Ido4SaleOrderItem> ido4SaleOrderItems) {
        this.ido4SaleOrderItems = ido4SaleOrderItems;
    }




}


